package com.object;

import com.Inter.Exchange_;
import com.function.Remove;
import com.function.TwoTuple;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;


/** 将Get_File中保存下来的文件内容集合对象做一个批量修改
* */
public class  Exchange implements Exchange_ {
    @Override
    public List<String> Exchange_Internet(List<String> objects) {
        try {
            if (objects!=null&&objects.size()>0){
                String encoding = "utf-8";
                String s0="";
                // 文件地址前缀
                String s1 = "fstv-cdn.ks3-cn-beijing.ksyuncs.com";
                // 要post的内网地址前缀
                String s2 = "http://ks3-cn-beijing-internal.ksyun.com/fstv-cdn";
                for (int i = 0; i < objects.size() ; i++) {
                    s0=objects.get(i).replaceAll(s1,s2);
                    objects.set(i,s0);
                }
            }else {
                System.out.println("文件异常，请检查文件内容");
            }
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
}
